package com.glsc.ngateway.common.base.domain.oracle.xinyizj;

import io.swagger.annotations.ApiModelProperty;
import lombok.*;

import javax.persistence.*;
import java.math.BigDecimal;

@ToString
@Data
@Entity
@Builder
@AllArgsConstructor
@NoArgsConstructor
@Table(name = "EA_FS.FS_IN_DEPOS_MARGIN_BAL")
@IdClass(FsMonitorMarginBalKey.class)
public class FsInDeposMarginBal {


    @ApiModelProperty(value = "结算主体ID")
    @Column(name = "SETTLE_UNIT_ID", columnDefinition = "NUMBER(5,0) COMMENT '结算主体ID'")
    private Long settleUnitId;

    @Id
    @ApiModelProperty(value = "余额日期")
    @Column(name = "BAL_DATE", columnDefinition = "NUMBER(8,0) COMMENT '余额日期'")
    private Long balDate;

    @ApiModelProperty(value = "币种")
    @Column(name = "CUR_TYPE", columnDefinition = "VARCHAR2(100) COMMENT '币种'")
    private String curType;

    @Id
    @ApiModelProperty(value = "资金性质：0:客户 1:自有  2:信用 ")
    @Column(name = "FUND_PROP", columnDefinition = "VARCHAR2(100) COMMENT '资金性质：0:客户 1:自有  2:信用 '")
    private String fundProp;

    @ApiModelProperty(value = "存管方式 01独立存管02 三方存管 ")
    @Column(name = "DEPOSIT_MODE", columnDefinition = "VARCHAR2(100) COMMENT '存管方式 01独立存管02 三方存管'")
    private String depositMode;

    @ApiModelProperty(value = "资金归属 01 期权 02 贵金属")
    @Column(name = "FUND_OWN", columnDefinition = "VARCHAR2(100) COMMENT '资金归属 01 期权 02 贵金属'")
    private String fundOwn;

    @Id
    @ApiModelProperty(value = "银行代码")
    @Column(name = "BANK_CODE", columnDefinition = "VARCHAR2(100) COMMENT '银行代码'")
    private String bankCode;

    @Id
    @ApiModelProperty(value = "保证金余额")
    @Column(name = "MARGIN_BAL", columnDefinition = "NUMBER(19,2) COMMENT '保证金余额'")
    private BigDecimal marginBal;

    @ApiModelProperty(value = "清算日期")
    @Column(name = "CLEAR_DATE", columnDefinition = "NUMBER(8,0) COMMENT '清算日期'")
    private BigDecimal clearDate;

    @ApiModelProperty(value = "银行账号")
    @Column(name = "BANK_ACC", columnDefinition = "VARCHAR2(100) COMMENT '银行账号'")
    private String bankAcc;

    @ApiModelProperty(value = "上日余额")
    @Column(name = "BEGIN_BALANCE", columnDefinition = "NUMBER(19,2) COMMENT '上日余额'")
    private BigDecimal beginBalance;

    @ApiModelProperty(value = "可用余额")
    @Column(name = "AVA_BAL", columnDefinition = "NUMBER(19,2) COMMENT '可用余额'")
    private BigDecimal avaBal;

    @ApiModelProperty(value = "接口类型")
    @Column(name = "INT_TYPE", columnDefinition = "VARCHAR2(100) COMMENT '接口类型'")
    private String intType;

    @ApiModelProperty(value = "1经纪 2公募")
    @Column(name = "GT_TYPE", columnDefinition = "VARCHAR2(100) COMMENT '1经纪 2公募'")
    private String gtType;

    @ApiModelProperty(value = "接口标识：接口类型+序号")
    @Column(name = "INT_CODE", columnDefinition = "VARCHAR2(100) COMMENT '接口标识：接口类型+序号'")
    private String intCode;


}
